import request from '@/utils/request'

// 模糊搜索查询老师名称
export function getTeachersByName(query) {
  return request({
    url: '/school/teacher/getTeacherByName',
    method: 'get',
    params: query
  })
}

// 查询所有老师
export function getAllTeacher() {
  return request({
    url: '/school/teacher/getAllTeacher',
    method: 'get'
  })
}



// 查询老师信息列表
export function listTeacher(query) {
  return request({
    url: '/school/teacher/list',
    method: 'get',
    params: query
  })
}

// 查询老师信息详细
export function getTeacher(id) {
  return request({
    url: '/school/teacher/' + id,
    method: 'get'
  })
}

// 新增老师信息
export function addTeacher(data) {
  return request({
    url: '/school/teacher',
    method: 'post',
    data: data
  })
}

// 修改老师信息
export function updateTeacher(data) {
  return request({
    url: '/school/teacher',
    method: 'put',
    data: data
  })
}

// 删除老师信息
export function delTeacher(id) {
  return request({
    url: '/school/teacher/' + id,
    method: 'delete'
  })
}

// 导出老师信息
export function exportTeacher(query) {
  return request({
    url: '/school/teacher/export',
    method: 'get',
    params: query
  })
}